package org.itboys.mobile.service.mysql.web.commision;

import org.itboys.mobile.common.SundayCommonConstants;
import org.itboys.mobile.entity.mysql.wallet.SundayWalletRecord;
import org.itboys.mysql.service.BaseMySqlService;
import org.itboys.param.PageResult;
import org.itboys.param.ParamUtil;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zhangyang on 2018/2/6.
 * 圣代_提成管理_后台_service
 */
@Service
public class SundayCommisionService extends BaseMySqlService<SundayWalletRecord> {


    public PageResult<SundayWalletRecord> select(HttpServletRequest request){
        Map<String,Object> param = ParamUtil.packageMysqlPageParam(request,"memberNickName","orderNo");
        param.put("type", SundayCommonConstants.wallet_record_type_amount_commission);
        param.put("sort_name","id");
        param.put("sort_order","desc");
        List<SundayWalletRecord> recordList = super.select(param);
        return new PageResult<SundayWalletRecord>(recordList,super.count(param));
    }



}
